﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace LLServer.Battle
{
    public class Turn 
    {
        private int cpt_id;
        private string cpt_name;
        private int ship_id;
        private int target_tile;
        private float damage;
        private bool shot;
        private bool pass;
        private bool flee;
        private bool surrender;

        #region Properties
        public int Cpt_id
        {
            get { return cpt_id; }
            set { cpt_id = value; }
        }

        public string Cpt_name
        {
            get { return cpt_name; }
            set { cpt_name = value; }
        }

        public int Ship_id
        {
            get { return ship_id; }
            set { ship_id = value; }
        }

        public int Target_tile
        {
            get { return target_tile; }
            set { target_tile = value; }
        }

        public float Damage
        {
            get { return damage; }
            set { damage = value; }
        }

        public bool Shot
        {
            get { return shot; }
            set { shot = value; }
        }

        public bool Pass
        {
            get { return pass; }
            set { pass = value; }
        }

        public bool Flee
        {
            get { return flee; }
            set { flee = value; }
        }

        public bool Surrender
        {
            get { return surrender; }
            set { surrender = value; }
        }
        #endregion

        public Turn()
        {

        }

        #region Serialize
        /*public Turn(SerializationInfo info, StreamingContext ctxt)
        {
            this.cpt_id = (int)info.GetValue("CaptainId", typeof(int));
            this.target_tile = (int)info.GetValue("TargetTile", typeof(int));
            this.shot = (bool)info.GetValue("Shot", typeof(bool));
            this.surrender = (bool)info.GetValue("Surrender", typeof(bool));
        }

        public void GetObjectData(SerializationInfo info, StreamingContext context)
        {
            info.AddValue("CaptainId", this.cpt_id);
            info.AddValue("TargetTile", this.target_tile);
            info.AddValue("Shot", this.shot);
            info.AddValue("Surrender", this.surrender);
        }*/
        #endregion
    }
}
